// 版权归陈超所有

#pragma once

#include "CoreMinimal.h"
#include "UI/WidgetController/CC_WidgetController.h"
#include "CC_AttributeMenuWidgetController.generated.h"

struct FGameplayAttribute;
class UDataAsset_AttributeInfo;
struct FAttributeInfo;
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAttributeInfoSignature, const FAttributeInfo&, Info);

/**
 * 
 */
UCLASS(Blueprintable)
class CC_AURA_API UCC_AttributeMenuWidgetController : public UCC_WidgetController
{
	GENERATED_BODY()

public:
	//广播初始值
	virtual void BroadcastInitialValues() override;

	//依赖的绑定回调函数
	virtual void BindCallbacksToDependencies() override;

protected:
	UPROPERTY(EditDefaultsOnly, Category="CC|GAS|Attributes")
	TObjectPtr<UDataAsset_AttributeInfo> AttributeInfo;

	UPROPERTY(BlueprintAssignable, BlueprintReadWrite, Category="CC|GAS|Attributes")
	FOnAttributeInfoSignature OnAttributeInfoSignature;

private:
	void BroadcastAttributeInfo(const FGameplayTag& Tag, const FGameplayAttribute& Attribute);
	
};
